import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';

import '../message_model/em_message.dart';

class CustomerServiceState {


  ///底部安全距离高度
  double bottomHeight = 34;
  ///底部tabBar高度
  double tabHeight = 49;

  ///输入框高度
  double textFieldHeight = 36;

  ///发送按钮
  bool isShowSend = false;

  ///是否显示工具栏
  bool isShowTools = false;

  ///显示键盘
  bool isShowKeyboard = false;

  ///ToolsWidgetName
  late Map<String,dynamic> toolsData;
  late List toolsWidgets;

  ///输入框属性
  late TextEditingController textEditController;
  late FocusNode textFieldNode;

  ///底部tools单个widget
  List<Widget> gridToolsList = [];

  ///监听滑动刷新消息
  late ScrollController scrollController;


  EventChannel eventChannel = const EventChannel("listenerEvent/event");
  StreamSubscription<dynamic>? streamSubscription;


  ///消息列表
  List messages = [];


  ///init
  CustomerServiceState(){

    textEditController = TextEditingController();
    textFieldNode = FocusNode();

    scrollController = ScrollController();

    toolsData = {
      '图片':Icons.insert_photo
      ,'附件':Icons.file_copy
      ,'视频':Icons.camera_alt
      ,'留言':Icons.comment
      ,'商品':Icons.account_balance_wallet_rounded
      ,'订单':Icons.view_agenda
    };


  }

}